LINQ to SQL Transaction when Transaction is type Table

If the Transaction property from DataContext is being hidden by your DbContext class, just cast: ((DataContext) context). Transaction = trans That way Transaction is resolved by the compiler to DataContext. Transaction instead of DbContext.

Transaction Alternatively you could use a separate variable, which could be useful if you have several such calls to make: DataContext vanillaContext = context; vanillaContext. Transaction = trans (I have no idea whether or not this is the right way to use the transaction by the way - it's just the way to get around your naming collision. ).

If the Transaction property from DataContext is being hidden by your DbContext class, just cast: ((DataContext) context). Transaction = trans; That way Transaction is resolved by the compiler to DataContext. Transaction instead of DbContext.Transaction.

Alternatively you could use a separate variable, which could be useful if you have several such calls to make: DataContext vanillaContext = context; vanillaContext. Transaction = trans; (I have no idea whether or not this is the right way to use the transaction by the way - it's just the way to get around your naming collision. ).

Damn it! I had a feeling it was something like this, I had attempted casting it to my DbContext type, but it hadn't hit me that it would need to cast to the base type. Works perfectly, thanks!(PS - could you be a bit quicker next time?) – Jaymz Jul 7 at 16:38.

If the Transaction property from DataContext is being hidden by your DbContext class, just cast.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.